# Maintainer:
# Contributor: Daniel Löbl <dloebl.2000@gmail.com>

pkgname=libcgif
pkgver=0.3.1
pkgrel=1
pkgdesc='A fast and lightweight GIF encoding library'
arch=(loong64 x86_64)
url='https://github.com/dloebl/cgif'
license=(MIT)
depends=(glibc)
makedepends=(meson)
source=(https://github.com/dloebl/cgif/archive/V$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('74a56ddd07b0a28938918f9d566012d4324fd183d3783a075f656520e79d82fb')

build() {
  meson build cgif-$pkgver \
    --prefix=/usr
  meson compile -C build
}

check() {
  meson test -C build
}

package() {
 #mkdir -p "$pkgdir/usr/lib/" "$pkgdir/usr/include/" "$pkgdir/usr/share/licenses/$pkgname/"
  meson install -C build \
    --destdir "$pkgdir"
  install -Dm644 cgif-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
